#define _CRT_SECURE_NO_WARNINGS


#include<stdio.h>
int main()
{
	int n = 0;
	int a = 0;
	int c = 1;
	scanf("%d",&n);
	for (a = 1;a <= n;a++)
		c = a * c;
	printf("%d\n", c);
	return 0;
}